import { request } from "../utils/request";
//用户注册
export function apiUserRegister(data={}){
	return request({
		url:"/user/app/register",
		data,
		method:"POST",
	})
}
//获取邮箱验证码
export function apiUserGetEmailCode(data={}){
	return request({
		url:"/user/app/send/email/code",
		data,
		method:"POST",
	})
}


//登录
export function apiUserLogin(data={}){
	return request({
		url:"/user/app/login",
		data,
		method:"POST",
	})
}
//获取ID 
export function apiUserGetId(data={}){
	return request({
		url:"/user/app/get/id",
		data
	})
}
//忘记密码
export function apiUserSetPassWord(data={}){
	return request({
		url:"/user/app/updatePasswordByCheckCode",
		data,
		method:"POST",
	})
}
//用户下单
export function apiUserSubmitOrder(data={}){
	return request({
		url:"/user/app/order/submit",
		data,
		method:"POST",
	})
}

//用户下单
export function apiUserPayOrder(data={}){
	return request({
		url:"/user/app/order/to/pay",
		data,
		method:"POST",
	})
}


//用户下单
export function apiUserSetHeaderImage(data={}){
	return request({
		url:"/user/app/update/head",
		data,
		method:"POST",
		upload:true,
	})
}

//设备分享
export function apiUserShareDevice(data={}){
	return request({
		url:"/user/app/device/share2",
		data,
		method:"POST",
	})
}

//设备解绑
export function apiUserUnbindingDevice(data={}){
	return request({
		url:"/user/app/device/unbind",
		data,
		method:"POST",
	})
}

//获取设备订单
export function apiUserGetDeviceOrderList(data={}){
	return request({
		url:"/user/app/device/order/list",
		data,
	})
}


//注销账号
export function apiUserLogoffAccount(data={}){
	return request({
		url:"/user/app/logoff",
		data,
		method:"POST",
	})
}


//退出登录账号
export function apiUserLogoutAccount(data={}){
	return request({
		url:"/user/app/logout",
		data,
		method:"POST",
	})
}
//上传图片
export function apiUserUploadImage(data={}){
	return request({
		url:"/user/app/upload/img",
		data,
		method:"POST",
		upload:true,
	})
}


export function apiUserFeedBack(data={}){
	return request({
		url:"/user/app/advice/feedback",
		data,
		method:"POST"
	})
}
//获取分享给他人的列表 
export function apiUserGetSharedDeviceList(data={}){
	return request({
		url:"/user/app/device/share/list",
		data,
	})
}
//删除分享的用户
export function apiUserDeleteSharedUser(data={}){
	return request({
		url:"/user/app/del/share",
		data,
		method:"POST"
	})
}